Skip to content

Export Signify methods, support BLAKE2s#38

Open
mchack-work wants to merge 9 commits intomainfrom
signify-methods
Open

Export Signify methods, support BLAKE2s#38
mchack-work wants to merge 9 commits intomainfrom
signify-methods

Conversation

@mchack-work
Copy link
Member

@mchack-work mchack-work commented Feb 2, 2026

Description

  • Make Signify types like public key and signatures available externally, for instance for use in sign-tool, tkey-mgt, tkeyimage and the like. And, of course, external project who would like to read and write to these this kind of files.

  • Write methods to handle import and export more gracefully.

  • Add tests for signify methods.

  • Change the tkey-sign command accordingly.

  • Add support for choice of hash algoritm (-a flag)

  • Add support for BLAKE2s algorithm.

Fixes #36

See also:

Type of change

  • Feature (non breaking change which adds functionality)

Submission checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my changes
  • I have tested and verified my changes on target
  • My changes are well written and CI is passing
  • I have squashed my work to relevant commits and rebased on main for linear history
  • I have added a "Co-authored-by: x" if several people contributed, either pair programming or by squashing commits from different authors.
  • I have updated the documentation where relevant (readme, dev.tillitis.se etc.)
  • QEMU is updated to reflect changes

- Make public key and signatures available externally.

- Add methods to import and export these types to and from buffers and
  files.

- Add tests for parsing and generating.

- Move writeRetry() to util.go

- Signify uses "Ed", we use "Eb", indicating to us that our message
  should be hashed with BLAKE2s.
@mchack-work mchack-work force-pushed the signify-methods branch 2 times, most recently from b751852 to 74bf928 Compare February 3, 2026 16:50
- Clean up the main function and hide the complexities of all the
  commands in their own functions. Also reduces the cyclomatic
  complexity.

- Hide some args, like device path, device speed, USS filename and
  request USS from user, in structs.
- Introduce new function getMessage() that produces the message to be
  signed or verified.

- Use message produced by getMessage() in Sign() and Verified() and
  dependent helper functions.
Choose hash algorithm to use with -a/--alg. Options are "ed" (default,
SHA-512) and "b2s" (BLAKE2s).
@mchack-work mchack-work changed the title Export Signify methods Export Signify methods, support BLAKE2s Feb 4, 2026
@mchack-work mchack-work marked this pull request as ready for review February 24, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support BLAKE2s digests

1 participant